<?php
/**
 * QQAS - share your knowledge to the world!
 *
 * @author		xiaochong0302 <xiaochong0302@gmail.com>
 * @copyright	Copyright (c) 2011, Koogua Studio.
 * @license		http://www.qqas.org/user_guide/license.html
 * @link		http://www.qqas.org
 * @since		Version 1.0
 * @filesource
 */


//取得问题状态
function get_question_status($status)
{
	$options = L('question_status_options');
	return $options[$status];
}


//获取广告位下广告数目
function get_location_ad_count($location_id)
{
    $Adv = M('Advertisement');
    $map = array('location_id' => $location_id);
	$count = $Adv->where($map)->count();
    return intval($count);
}


//创始人验证
function is_founder($user_id)
{
	$founder = get_site_config('site_founder');
	return in_array($user_id, explode(',', $founderID)) ? true : false;
}


/* End of file function.php */
/* Location: ./App/Common/Admin/function.php */